In a thermal cycle, for example, a closed-loop thermal cycle such as Organic Rankine Cycle (ORC) or other cycle, a working fluid is flowed through an integrated power module (IPM) that includes an expander or a turbine. An efficiency of the thermal cycle depends, in part, on a quality of the working fluid. The bypass loop is activated when the quality is below the required state, such as in the startup cycle, and circulates the fluid until quality is within limits. In some instances, the thermal cycle efficiency can be optimized by flowing the working fluid through the expander while, in other instances, the efficiency can be optimized by bypassing the expander. Examples of systems that control flow of the working fluid through the expander include valves (for example, slam valves or other valves) and associated piping that are external to the expander itself.